﻿<UserControl x:Name="CtrlFlatPack"
             x:Class="Titler.FPControls.FlatPackCtrl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:Titler"
             mc:Ignorable="d"
             xmlns:data="clr-namespace:Titler.ControlModels"
             Width="300"
             xmlns:Properties="clr-namespace:Titler.Properties">


    <UserControl.Resources>
        <Style x:Key="{x:Type Label}"
               TargetType="{x:Type Label}">
            <Setter Property="Padding"
                    Value="2" />
            <Setter Property="Margin"
                    Value="0,0,0,2" />
            <Setter Property="HorizontalContentAlignment"
                    Value="Center" />
            <Setter Property="VerticalContentAlignment"
                    Value="Center" />
            <Setter Property="Height"
                    Value="30" />
            <Setter Property="FontFamily"
                    Value="Segoe UI" />
            <Setter Property="FontSize"
                    Value="12pt" />
        </Style>
        <Style x:Key="{x:Type ComboBox}"
               TargetType="{x:Type ComboBox}">
            <Setter Property="Padding"
                    Value="2" />
            <Setter Property="Margin"
                    Value="0,0,0,2" />
            <Setter Property="Background">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0.5,1"
                                         StartPoint="0.5,0">
                        <GradientStop Color="#FFF3F3F3"
                                      Offset="0.45" />
                        <GradientStop Color="#FFE0E0E0"
                                      Offset="0.55" />
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
            <Setter Property="BorderBrush"
                    Value="#FF707070" />
            <Setter Property="Height"
                    Value="30" />
            <Setter Property="FontFamily"
                    Value="Segoe UI" />
            <Setter Property="FontSize"
                    Value="12pt" />
            <Setter Property="HorizontalContentAlignment"
                    Value="Center" />
            <Setter Property="VerticalContentAlignment"
                    Value="Center" />
        </Style>

        <data:FPControlModel x:Key="fPControlModelView" />

    </UserControl.Resources>

    <Grid DataContext="{StaticResource fPControlModelView}">
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <StackPanel>
            <Label x:Name="label"
                   Content="Encaps Length (mm)"
                   Margin="0,0,0,2"
                   d:LayoutOverrides="Height" />
            <Label x:Name="label_Copy"
                   Content="Encaps Width (mm)"
                   Margin="0,0,0,2" />
            <Label x:Name="label_Copy1"
                   Content="Encaps Material"
                   Margin="0,0,0,2" />
            <Label x:Name="label_Copy2"
                   Content="Working Fluid"
                   Margin="0,0,0,2" />
            <Label x:Name="label_Copy3"
                   Content="Reel Material"
                   Margin="0,0,0,2" />
            <Label x:Name="label_Copy4"
                   Content="Reel Max OD (in)"
                   Margin="0,0,0,2" />
            <Label x:Name="label_Copy5"
                   Content="Reel Width (in)"
                   Margin="0,0,0,2" />
            <Label x:Name="label_Copy6"
                   Content="Reel Shaft OD (in)"
                   Margin="0,0,0,2" />
            <Label x:Name="label_Copy7"
                   Content="Other Options"
                   Margin="0" />
        </StackPanel>
        <StackPanel Grid.Column="1">
            <ComboBox x:Name="EncapsLength"
                      Text="{Binding FPEncapsLength}"
                      ItemsSource="{Binding Source={x:Static Properties:Settings.Default}, Path=List_EncapsLength}"
                      Margin="0,0,0,2"
                      d:LayoutOverrides="Height"
                      IsEditable="True"
                      IsSynchronizedWithCurrentItem="True"
                      Cursor="Cross"
                      LostFocus="Control_Add_Item" />
            <ComboBox x:Name="EncapsWidth"
                      Text="{Binding FPEncapsWidth}"
                      Margin="0,0,0,2"
                      IsEditable="True"
                      LostFocus="Control_Add_Item"
                      IsSynchronizedWithCurrentItem="True"
                      Cursor="Cross" />
            <ComboBox x:Name="EncapsMaterial"
                      Text="{Binding FPEncapsMaterial}"
                      ItemsSource="{Binding Source={x:Static Properties:Settings.Default}, Path=List_Encapsulation}"
                      Margin="0,0,0,2"
                      IsSynchronizedWithCurrentItem="True"
                      Cursor="Cross" />
            <ComboBox x:Name="WorkingFluid"
                      Text="{Binding FPWorkingFluid}"
                      ItemsSource="{Binding Source={x:Static Properties:Settings.Default}, Path=List_Fluids}"
                      Margin="0,0,0,2"
                      IsSynchronizedWithCurrentItem="True"
                      Cursor="Cross" />
            <ComboBox x:Name="ReelMaterial"
                      Text="{Binding FPReelMaterial}"
                      ItemsSource="{Binding Source={x:Static Properties:Settings.Default}, Path=List_ReelMaterial}"
                      Margin="0,0,0,2"
                      IsSynchronizedWithCurrentItem="True"
                      Cursor="Cross" />
            <ComboBox x:Name="ReelMaxOD"
                      Text="{Binding FPReelMaxOD}"
                      Margin="0,0,0,2"
                      IsEditable="True"
                      LostFocus="Control_Add_Item"
                      IsSynchronizedWithCurrentItem="True"
                      Cursor="Cross" />
            <ComboBox x:Name="ReelWidth"
                      Text="{Binding FPReelWidth}"
                      Margin="0,0,0,2"
                      IsEditable="True"
                      LostFocus="Control_Add_Item"
                      IsSynchronizedWithCurrentItem="True"
                      Cursor="Cross" />
            <ComboBox x:Name="ReelShaftOD"
                      Text="{Binding FPReelShaftOD}"
                      Margin="0,0,0,2"
                      IsEditable="True"
                      LostFocus="Control_Add_Item"
                      IsSynchronizedWithCurrentItem="True"
                      Cursor="Cross" />
            <ComboBox x:Name="OtherOptions"
                      Text="{Binding FPOtherOptions}"
                      ItemsSource="{Binding Source={x:Static Properties:Settings.Default}, Path=List_Bumper}"
                      Margin="0"
                      IsEditable="True"
                      LostFocus="Control_Add_Item"
                      IsSynchronizedWithCurrentItem="True"
                      Cursor="Cross" />
        </StackPanel>

    </Grid>
</UserControl>
